package br.com.despesasPlan.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {
	public static Connection getConnection() {
		try {
			return DriverManager.getConnection("jdbc:mysql://localhost:3306/despesasPlan", "root", "mysqlsenha");
		} catch (SQLException e) {
			throw new RuntimeException("Erro ao conectar: "+e.getMessage());
		}
	}
}
